<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_drivers: /workspace/software/workspace/src/catkin/hardware/blmc_drivers/demos/demo_2_motors.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_drivers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('demo__2__motors_8cpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">demo_2_motors.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;atomic&gt;</code><br />
<code>#include &lt;signal.h&gt;</code><br />
<code>#include &lt;<a class="el" href="pd__control_8hpp_source.html">pd_control.hpp</a>&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for demo_2_motors.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="demo__2__motors_8cpp__incl.png" border="0" usemap="#_2workspace_2software_2workspace_2src_2catkin_2hardware_2blmc__drivers_2demos_2demo__2__motors_8cpp" alt=""/></div>
<map name="_2workspace_2software_2workspace_2src_2catkin_2hardware_2blmc__drivers_2demos_2demo__2__motors_8cpp" id="_2workspace_2software_2workspace_2src_2catkin_2hardware_2blmc__drivers_2demos_2demo__2__motors_8cpp">
<area shape="rect" id="node4" href="pd__control_8hpp.html" title="pd_control.hpp" alt="" coords="931,124,1038,151"/>
<area shape="rect" id="node5" href="motor_8hpp.html" title="License BSD&#45;3&#45;Clause " alt="" coords="827,199,972,240"/>
<area shape="rect" id="node35" href="analog__sensor_8hpp.html" title="License BSD&#45;3&#45;Clause " alt="" coords="1017,199,1163,240"/>
<area shape="rect" id="node11" href="motor__board_8hpp.html" title="License BSD&#45;3&#45;Clause " alt="" coords="805,288,951,329"/>
<area shape="rect" id="node34" href="device__interface_8hpp.html" title="License BSD&#45;3&#45;Clause " alt="" coords="1203,467,1350,508"/>
<area shape="rect" id="node13" href="os__interface_8hpp.html" title="blmc_drivers/utils\l/os_interface.hpp" alt="" coords="1425,467,1549,508"/>
<area shape="rect" id="node31" href="can__bus_8hpp.html" title="License BSD&#45;3&#45;Clause " alt="" coords="755,377,900,419"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a75d8b98fafbd2fb243e91c6164b114ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75d8b98fafbd2fb243e91c6164b114ce"></a>
std::atomic_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="demo__2__motors_8cpp.html#a75d8b98fafbd2fb243e91c6164b114ce">StopDemos</a> (false)</td></tr>
<tr class="memdesc:a75d8b98fafbd2fb243e91c6164b114ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">This boolean is here to kill cleanly the application upon ctrl+c. <br /></td></tr>
<tr class="separator:a75d8b98fafbd2fb243e91c6164b114ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13848d945610347db87a059fe0b43f35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="demo__2__motors_8cpp.html#a13848d945610347db87a059fe0b43f35">my_handler</a> (int s)</td></tr>
<tr class="memdesc:a13848d945610347db87a059fe0b43f35"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the callback upon a ctrl+c call from the terminal.  <a href="#a13848d945610347db87a059fe0b43f35">More...</a><br /></td></tr>
<tr class="separator:a13848d945610347db87a059fe0b43f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="demo__2__motors_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main demo program.  <a href="#a3c04138a5bfe5d72780bb7e82a18e627">More...</a><br /></td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Maximilien Naveau (<a href="#" onclick="location.href='mai'+'lto:'+'max'+'im'+'ili'+'en'+'.na'+'ve'+'au@'+'gm'+'ail'+'.c'+'om'; return false;">maxim<span style="display: none;">.nosp@m.</span>ilie<span style="display: none;">.nosp@m.</span>n.nav<span style="display: none;">.nosp@m.</span>eau@<span style="display: none;">.nosp@m.</span>gmail<span style="display: none;">.nosp@m.</span>.com</a>) </dd></dl>
<dl class="section version"><dt>Version</dt><dd>0.1 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2018-11-29</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2018 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main demo program. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td></td></tr>
    <tr><td class="paramname">argv</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a class="anchor" id="a13848d945610347db87a059fe0b43f35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void my_handler </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the callback upon a ctrl+c call from the terminal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80e6cdd9bbc895bd262b4f65e652822c.html">catkin</a></li><li class="navelem"><a class="el" href="dir_dace45749abc688185d44e8b166728a5.html">hardware</a></li><li class="navelem"><a class="el" href="dir_87d2711f33d814f4f77c208b3c1f3ba9.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="dir_293b3db1cc079afe618c903d28d185a2.html">demos</a></li><li class="navelem"><a class="el" href="demo__2__motors_8cpp.html">demo_2_motors.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
